package org.awa.demo.opencv.task.kunming;

import cn.hutool.core.util.RandomUtil;
import lombok.Data;


@Data
public class TrafficDBDto {

    //平均车速
    private Double carAverageSpeed;
    //长车平均车速
    private Double carAverageSpeedLong;
    //中车平均车速
    private Double carAverageSpeedMiddle;
    //短车平均车速
    private Double carAverageSpeedShort;
    //平均车流量
    private Integer carTrafficFlow;
    //长车车流量
    private Integer carTrafficFlowLong;
    //中车车流量
    private Integer carTrafficFlowMiddle;
    //短车车流量
    private Integer carTrafficFlowShort;

    public static TrafficDBDto randomDto() {
        TrafficDBDto dto = new TrafficDBDto();
        dto.setCarAverageSpeed(RandomUtil.randomDouble(60,120));
        dto.setCarAverageSpeedLong(RandomUtil.randomDouble(60,120));
        dto.setCarAverageSpeedMiddle(RandomUtil.randomDouble(60,120));
        dto.setCarAverageSpeedShort(RandomUtil.randomDouble(60,120));
        dto.setCarTrafficFlow(RandomUtil.randomInt(30,360));
        dto.setCarTrafficFlowLong(RandomUtil.randomInt(30,360));
        dto.setCarTrafficFlowMiddle(RandomUtil.randomInt(30,360));
        dto.setCarTrafficFlowShort(RandomUtil.randomInt(30,360));
        return dto;
    }

}
